Skip to content

[dnm] storage operation3#45133

Draft
l0lawrence wants to merge 79 commits intoAzure:mainfrom
l0lawrence:storageblob3
Draft

[dnm] storage operation3#45133
l0lawrence wants to merge 79 commits intoAzure:mainfrom
l0lawrence:storageblob3

Conversation

@l0lawrence
Copy link
Member

No description provided.

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Feb 11, 2026
@github-actions
Copy link

github-actions bot commented Feb 11, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-storage-blob

@l0lawrence
Copy link
Member Author

/azp run python - storage - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

self._client.blob.set_tier(
tier=premium_page_blob_tier,
timeout=kwargs.pop('timeout', None),
snapshot=self.snapshot,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does self.snapshot come from?

blob.snapshot = generated.snapshot
blob.is_append_blob_sealed = generated.properties.is_sealed
blob.metadata = generated.metadata.additional_properties if generated.metadata else {} # type: ignore [assignment]
blob.metadata = ( # type: ignore [assignment]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is because additional_properties is no longer a property on the model

blob.tag_count = generated.properties.tag_count
blob.tags = parse_tags(generated.blob_tags)
blob.object_replication_source_properties = deserialize_ors_policies(generated.object_replication_metadata)
blob.object_replication_source_properties = deserialize_ors_policies(generated.object_replication_metadata.as_dict() if generated.object_replication_metadata else None)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expects a dict

# This makes sure that if_match is set so that we can validate
# that subsequent downloads are to an unmodified blob
if self.request_options.get("modified_access_conditions"):
if self.request_options.get("modified_access_conditions") is not None:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is how the _patch works that we need this

return etag


_generated_utils.quote_etag = _quote_etag_passthrough
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was to get around the weirdness between how we used to handle etag vs. how we handle it now --- in old recordings we passed etags without quotes around them, this is for backcompat



# Override quote_etag to be a no-op pass-through.
# The generated quote_etag wraps etags in double quotes per RFC 7232,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: maybe we need to change the serialization


# # content_length is no longer accepted as a kwarg in most generated methods
# # (it's calculated internally or is a keyword-only arg). Remove if 0 (page blob create pattern).
# if "content_length" in kwargs and kwargs["content_length"] == 0:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

internal_user_delegation_key.signed_start = _to_utc_datetime(service_user_delegation_key.signed_start)
internal_user_delegation_key.signed_expiry = _to_utc_datetime(service_user_delegation_key.signed_expiry)
internal_user_delegation_key.signed_start = (
service_user_delegation_key.signed_start
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used to be utc_datetime and now is a string bc python can't handle the datetime type

access_conditions = get_access_conditions(lease)
try:
return cast(Dict[str, Union[str, datetime]], await self._client.container.set_access_policy(
container_acl=signed_identifiers or None,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also is related to typespec being needed to change

@l0lawrence
Copy link
Member Author

/azp run python - storage - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant